<?php
defined( '_JEXEC' ) or die( 'Restricted access' );

jimport( 'joomla.application.component.view' );

class pqcesViewNuevacat extends JView
{
	function display($tpl = null)
	{
		$model = $this->getModel('nuevacat');
		$categoria	=& $model->getData();
		$isNew		= ($categoria->id < 1);
		$text = $isNew ? JText::_('COM_PQCE_NEWF') : JText::_('COM_PQCE_EDIT');
		JToolBarHelper::title(   JText::_( 'COM_PQCE_CAT' ).': <small><small>[ ' . $text.' ]</small></small>' );
		JToolBarHelper::save('saveCategory',JText::_( 'COM_PQCE_SAVEC' ));
		if ($isNew)  {
			JToolBarHelper::cancel('close',JText::_( 'COM_PQCE_CANCEL' ));
		} else {
			JToolBarHelper::cancel( 'close', JText::_( 'COM_PQCE_CLOSE' ) );
		}

		$this->assignRef('categoria',		$categoria);
		parent::display($tpl);
	}
}
